/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cassys.ejb.clients;

import cassys.application.DTOs.UserDTO;
import cassys.application.services.UserManager;
import cassys.domain.user.User;
import java.util.List;

/**
 *
 * @author UserRoleMapping
 */
public class UserManagementDelegate {

    private UserManager userBeanRemote = null;

    public UserManagementDelegate() {
        try {
            userBeanRemote = ServiceLocator.getInstance().lookupUserManagerBean();
            System.out.println("SSSSS");
        } catch (Exception e) {
            System.out.println(e.getStackTrace());
        }
    }
    public void modifyUser(User user,String role) throws Exception {
        userBeanRemote.modifyUser(user,role);
    }
    
    public void uploadCSV(UserDTO userDTO) throws Exception {
        userBeanRemote.uploadCSV(userDTO);
    }

    public void saveUser(UserDTO userDTO) throws Exception {
        userBeanRemote.saveUser(userDTO);
    }

    public List<User> getUser(String userId) throws Exception {
        return userBeanRemote.getUser(userId);
    }

    public void deleteUser(int userSeqNo) throws Exception {
        userBeanRemote.deleteUser(userSeqNo);
    }
}
